<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/3/9
  Time: 14:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>全部订单</title>
</head>
<script type="text/javascript" src="js/jquery.min.js"></script>
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/bootstrap.css">
<body>
<nav class="navbar navbar-default">
    <div>
        <ul class="nav navbar-nav">
            <li>
                <a><b>快递派发</b></a>
            </li>
            <li>
                <a>${phone }</a>
            </li>
            <li>
                <a href="index.jsp">
                    首页
                </a>
            </li>

            <li>
                <a id="time1"></a>
            </li>

        </ul>
    </div>
</nav>


<table border="1px" align="center">
    <tr>
        <td>编号</td>
        <td>类型</td>
        <td>寄件人姓名</td>
        <td>寄件人电话</td>
        <td>寄件人地址</td>
        <td>收件人姓名</td>
        <td>收件人电话</td>
        <td>收件人地址</td>
        <td>价格</td>
        <td>操作</td>

    </tr>

    <c:forEach items="${pageInfo.list}" var="applist">

        <tr>
            <td>${applist.waybill_no}</td>
            <td>${applist.mail_type}</td>
            <td>${applist.sender_name}</td>
            <td>${applist.sender_phone}</td>
            <td>${applist.sender_address}</td>
            <td>${applist.recipient_name}</td>
            <td>${applist.recipient_phone}</td>
            <td>${applist.recipient_address}</td>
            <td>${applist.mail_cost}</td>
            <td><a href="deleteAppoin.do?waybill_no=${applist.waybill_no}" onclick="cancelConfirm()">取消订单</a></td>
        </tr>
    </c:forEach>


</table>
<form style="text-align: center;font-size: 20px">
    <c:forEach begin="1" end="${pageInfo.pages}" var="index">
        <a href="showAllAppointByPhonePage.do?pageNum=${index}&pageSize=${pageInfo.pageSize}&phone=${phone}">${index}</a>
    </c:forEach>
</form>
<br/>

<form style="text-align: center">
    一页${pageInfo.pageSize }条,

    当前是第${pageInfo.pageNum }页,

    一共${pageInfo.pages }页,

    一共${pageInfo.total}条
</form>
<br/>

<form action="export.do" style="text-align: center">
    <input name="phone" value="${phone}" hidden="hidden">
    <input type="submit" value="导出Excel表">
</form>

</body>
</html>

<script>
    function showTime() {
        var now = new Date();
        return now.toLocaleString();
    }

    setInterval(function () {
        var d = showTime();
        $("#time1").html(d);
    }, 1000);
</script>

<script>
    function cancelConfirm() {
        return window.confirm('确定取消？');

    }
</script>

